//
//  UIControl+Swizzing.m
//  MMSwizzing_Example
//
//  Created by Mac on 2018/3/28.
//  Copyright © 2018年 CocoaPods. All rights reserved.
//

#import "UIControl+Swizzing.h"
#import <UIKit/UIKit.h>
#import <JRSwizzle/JRSwizzle.h>

//Action全局事件
@implementation UIControl (Swizzing)

+ (void)load {
    
    NSError *error = nil;
    [self jr_swizzleMethod:@selector(sendAction:to:forEvent:) withMethod:@selector(xl_sendAction:to:forEvent:) error:&error];
    NSLog(@"Swizzing Error = %@", error);
    
}

- (void)xl_sendAction:(SEL)action to:(nullable id)target forEvent:(nullable UIEvent *)event {
    
    [self xl_sendAction:action to:target forEvent:event];
}

@end
